#include "Linklist.h"
#include "time.h"
#include <sys/time.h>
#include "esp_spiffs.h"
#include "AS608.h"

#ifndef __UART_CMD_H
#define __UART_CMD_H

#define SCREEN_TX GPIO_NUM_18
#define SCREEN_RX GPIO_NUM_19
#define SCREEN_UART UART_NUM_1
#define ONCE      0x01
#define EVERY_DAY 0x02
#define WORK_DAY  0x03
#define CARD_SUCCESS 0x01
#define CARD_LATE 0x02
#define CARD_NONE 0x03

typedef struct Card_clock
{
    uint8_t month[2];
    uint8_t date[2];
    uint8_t hour[2];
    uint8_t min[2];
    uint8_t sec[2];
}Card_clock_t;


typedef struct Infomation
{
    char name[10];
    uint16_t ID;
    uint8_t position;
    uint8_t name_size;
    uint8_t status[90];
    time_t card_time[90];
    uint8_t param;
    struct Infomation* next;
}Infomation_t;



void User_Uart1_Init();
uint8_t Cmd_Judge();
size_t Register_finger_name(uint16_t ID,uint8_t position,char* name,Infomation_t* prevous,esp_vfs_spiffs_conf_t config,uint16_t* ID_arr);
void Finger_manage(Infomation_t* previous,uint16_t* ID,esp_vfs_spiffs_conf_t config,uint8_t* id_num);
void System_clock_config();
uint8_t Card_clock_set(Card_clock_t* set_time,uint8_t* card_mode);
uint8_t User_set_vol(uint8_t now_vol);
void Log_Information_Show(Infomation_t* previous,esp_vfs_spiffs_conf_t config,uint16_t* ID);
void Manager_Finger_Search(Infomation_t* previous,SearchResult_t * SearchResult);





#endif
